from django.contrib import admin
from .models import BlogType, Blog


@admin.register(BlogType)
class BlogTypeAdmin(admin.ModelAdmin):
	list_display = ('id', 'type_name')
	ordering = ('id',)


@admin.register(Blog)
class BlogAdmin(admin.ModelAdmin):
	list_display = ('id', 'title', 'blog_type', 'author', 'get_read_num', 'created_time', 'last_updated_time')
	ordering = ('id',)


# 修改网页title和站点header。
admin.site.site_title = "后台管理"
admin.site.site_header = "博客网站后台管理"
